package com.superm.mappers;

import com.superm.entity.StorgageRack;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 货架接口
 */
public interface StorgageRackMapper {

    /**
     * 查询信息
     * @return
     */
    List<StorgageRack> selectAll(@Param("storgageRack") StorgageRack storgageRack,@Param("pageNo") Integer pageNo,@Param("pageSize")Integer pageSize);


    /**
     * 根据编号查询指定货架信息
     * @param storgageRackId
     * @return
     */
    StorgageRack selectIdInfoMation(@Param("storgageRackId") Integer storgageRackId);

    /**
     * 查询条数
     * @param storgageRack
     * @return
     */
    int selectAllCount(@Param("storgageRack") StorgageRack storgageRack);


    /**
     * 添加信息
     * @param storgageRack
     * @return
     */
    int addInfoMation(@Param("storgageRack") StorgageRack storgageRack);


    /**
     * 修改信息
     * @param storgageRack
     * @return
     */
    int updateInfoMation(@Param("storgageRack") StorgageRack storgageRack);


    /**
     * 删除信息
     * @param storgageRack
     * @return
     */
    int deleteInfoMation(@Param("storgageRack") Integer storgageRack);

    /**
     * 加已用容量
     * @param storgageRackId
     * @return
     */
    int minusCaoacity(@Param("storgageRackId") Integer storgageRackId,@Param("minusCapacity")double minusCapacity);

    /**
     * 减少已用容量
     * @param storgageRackId
     * @param decreaseCaoacity
     * @return
     */
    int decreaseCaoacity(@Param("storgageRackId") Integer storgageRackId,@Param("minusCapacity")double decreaseCaoacity);

    Integer upStorgageJ(@Param("storgageRackId") Integer storgageRackId,@Param("minusCapacity")double decreaseCaoacity);
}

